<template>
  <router-view></router-view>
</template>

<script>
import axios from 'axios';
import {useConfigStore} from "@/stores/configStore";

export default {
  name: 'App',
  components: {},
  created() {
    this.getConfigApi();
  },
  methods: {
    //获取页面设置
    getConfigApi() {
      const configStore = useConfigStore();
      axios.get('/api/config').then((res) => {
        let resData = res.data;
        if (resData.code === 1) {
          configStore.setGlobalConfigData(resData.data.config)
        }
      }).catch((err) => {
        console.log('获取设置失败：', err)
      })
    }
  }
}
</script>

<style>
#app {
  font-family: "Microsoft YaHei UI", fangsong;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
